<div id="bed">:)</div>
<div id="1" class="widget">slider:0;100</div>
<div id="2" class="widget">hslider:0;100</div>
<div id="3" class="widget">vslider:0;100</div>
<div id="4" class="widget">chk:true/false</div>
<div id="5" class="widget">btn:msg;Click me!</div>
<div id="6" class="widget">ed:32;5;i was writing before....</div>
<div id="7" class="widget">elle:1;2;3;4;5</div>
<?php
echo'__FILE__ : ',__FILE__,'<br/>';
echo'getcwd() : ',getcwd(),'<br/>';
echo'available widgets : ';
pdir('./widgets');
echo'<p/><p/>';
echo implode(bdir('./widgets'),2);



/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

?>
<?php include'widgets/widgets.php';  ?>
<script type="text/javascript">//<![CDATA[


/*window.scenes=['content'];
window.anim=0;
window.onload=go;
window.clock=new Date().getTime();*/


var tags=[
'*'
];

//if(HTML5)display(block,[header,footer,section,aside,nav,article,input);
//if(zeromargin)margin(0,[root]);padding(0,[root])
//height()



var IE=document.all?true:false;
if(!IE)document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=getMouseXY;
var tempX=0,tempY=0;
function getMouseXY(e) {
  if(IE){ /*grab the x-y pos.s if browser is IE*/ tempX=event.clientX+document.body.scrollLeft;	tempY=event.clientY+document.body.scrollTop; }
  else{ /*grab the x-y pos.s if browser is NS*/ tempX=e.pageX; tempY=e.pageY; }
  if(tempX<0)tempX=0;
  if(tempY<0)tempY=0;
  document.getElementById('mxdeb').value=tempX;
  document.getElementById('mydeb').value=tempY;
  return true;
}


var refreshtimer=setInterval(function(){
  if(location.hash!=window.hash){ //alert('!!*'+window.hash+location.hash+'*');
  window.hash=location.hash; ajaxjs(location.hash.substr(1)); }
  var scene=window.scenes.pop();
  if(scene){
	window.anim=scene;
	var el=document.getElementById(scene);
	el.style.background="#"+"0".toString(16)+"0".toString(16)+"0".toString(16);
	var loop=setInterval(function(){
	  //el.style.background="red";
	  //el.style.opacity=el.style.opacity-1;
	  window.anim="#"+parseInt(eval('0x'+el.style.background.substr(1)),16);
	  if(window.anim>8)clearInterval(loop);
	},16);

/*	function d2h(d) {return d.toString(16);}
function h2d(h) {return parseInt(h,16);}
*/
    //
    //el.innerHTML=';y';
	}


function go(){ //alert('hash:'+window.location.hash.substr(1));
 /*if(screen.height<10000){ //alert(screen.height);  //document.body.style.font='12px/16px sans-serif'; }*/
  if(!location.hash)location.hash='article.php?tagmenu=1';
  else{ window.hash=location.hash; window.prevhash=location.hash; }
  ajaxjs(location.hash.substr(1));
  //alert(document.getElementById("aside").offsetHeight+"px");
  document.getElementById("content").style.height=document.getElementById("aside").offsetHeight-38+"px";
}

function fetch(cmd){
  if(window.XMLHttpRequest)var x=new XMLHttpRequest();
  else var x=new ActiveXObject("Microsoft.XMLHTTP");
  x.onreadystatechange=function(){ if(x.readyState==4 && x.status==200){
    var u=document.login.user;
    document.h.u.value=u.value;
    document.h.p.value=x.responseText
    document.h.action='geist/tau.php';
    document.h.submit();
  }}
  x.open("GET",cmd,true); x.send(); }

var dologin=function(){ var u=document.login.u;
  if(document.login.p.value==""){ document.login.p.select(); if(u=="")u.select(); }
  else{
    if(u.value=="")u.select();
    else fetch('geist/fetch.php?q='+document.login.u.value+document.login.p.value);
  }
}

var ajaxdiv=function(cmd,adiv){
  if (window.XMLHttpRequest) var x=new XMLHttpRequest();
  else var x=new ActiveXObject("Microsoft.XMLHTTP");
  x.onreadystatechange=function(){ if(x.readyState==4 && x.status==200){	//alert(x.responseText);
    document.getElementById(adiv).innerHTML=x.responseText; //replace
  }}
  x.open("GET",cmd,true); x.send();
}

function ajaxjs(cmd,div){
  if(!div)div='content';
  if (window.XMLHttpRequest) var x=new XMLHttpRequest();
  else var x=new ActiveXObject("Microsoft.XMLHTTP");
  x.onreadystatechange=function(){ if(x.readyState==4 && x.status==200){    //alert(x.responseText);
    window.prevhash=window.hash;
    eval(x.responseText);
	document.getElementById(div).scrollTop=0;
	window.anim.push(('content',''));
  }}
  x.open("GET",cmd,true); x.send();
}






//]]></script>